wikiimpresafandomcom-20200214-history
Pagina01
Esempi Inputbox |needs-updatephp = No |readme = |changelog = |parameters = |tags = |rights = |example = |compatibility = |bugzilla = InputBox |pagedrive1 = true }} The InputBox extension is a MediaWiki extension that adds already created HTML forms to wiki pages. Users can "complete" a form (entering text, selecting menu items, etc.) by entering text into the box. InputBox was originally created by Erik Möller for the purpose of adding a Create an article box to Wikinews. Download Installation *For MediaWiki 1.17 (and possibly 1.18), use this revision of InputBox.hooks.php. Example Box for starting a new article. General syntax InputBoxes are constructed like this: The type parameter is mandatory. All other parameters are optional. Box types The default location of the submit button(s) is below the input box. The submit button can be moved to the right by using the line break parameter to eliminate the line break between the input box and the submit button: break=no Having the submit button to the right is useful for search boxes when search suggestions would otherwise cover up a search button below the search box. For type=search2 the default location for the search button is to the right. Currently, it does not seem to be possible to add other parameters to this type of input box. This search box searches the entire wiki that it is placed on. Parameters Applying create '' to an existing page simply gives the edit page. In that case preload is ignored. Applying ''comment '' for a new page works. The texts taken from the MediaWiki: namespace are of course only examples, any existing page can be used for editintro or preload. Unfortunately preload does not yet work for the summary. Alignment enhancement If there is a need to define alignment each time an input box is used, one option is to just remove the div tag from the input box HTML and specify the div when posting the InputBox. A more versatile option would be to add the following code which allows changing the alignment in the options. By installing this modified copy of the code then you can specify align=left, align=center, or align=right. '''Caution!' The linked code is from Feb.2007. There have been bug fixes and feature additions to both MediaWiki and InputBox since that time. You may need to test for compatibility and functionality. Using InputBox in a template In order to create many similar input boxes, InputBox can be used in a template. However, passing template parameters to InputBox parameters only works if the ... tag is written as inside the template. The following example is a template to create a new wiki page from a named template: } preload= } }} ---- } preload= } }} ---- When instantiating the template, the first parameter gives the item that is created (default: article) as spelled out in the button, the second parameter gives the name of the template used to create the item (default: Template:Article). E.g., the code for an input box to create a new project from a project template might look like this: See also * Extension:Create Page * Extension:CreateArticle * Extension:CreateBox * Extension:Preloader * Extension:DPL Page Name S/N Maker Pagina02 Contenuto della pagina Category:Form extensions Category:Page creation extensions Category:Search widget extensions Category:Edit box extensions Category:pagine